import request from '@/utils/request'

/**
 * 操作日志列表
 * @param {参数} params 
 */
export function queryLogList(params) {
    return request({
        url: '/sys/log/list',
        method: 'get',
        params
    })
}

/**
 * 登录日志列表
 * @param {参数} params 
 */
export function queryLogininforList(params) {
    return request({
        url: '/sys/logininfor/list',
        method: 'get',
        params
    })
}


/**
 * MQTT日志列表
 * @param {参数} params 
 */
export function queryMqttLogList(params) {
    return request({
        url: '/sys/mqtt/log/list',
        method: 'get',
        params
    })
}

/**
 * 操作日志详情
 * @param {主键} id 
 */
export function queryLogInfo(id) {
    return request({
        url: `/sys/log/${id}`,
        method: 'get'
    })
}

/**
 * 登录日志详情
 * @param {主键} id 
 */
export function queryLogininforInfo(id) {
    return request({
        url: `/sys/logininfor/${id}`,
        method: 'get'
    })
}

/**
 * 删除操作日志
 * @param {主键} id 
 */
export function deleteLog(id) {
    return request({
        url: `/sys/log/delete/${id}`,
        method: 'delete'
    })
}

/**
 * 删除登录日志
 * @param {主键} id 
 */
export function deleteLogininfor(id) {
    return request({
        url: `/sys/logininfor/delete/${id}`,
        method: 'delete'
    })
}

/**
 * 删除MQTT日志
 * @param {主键} id 
 */
export function deleteMqttLog(id) {
    return request({
        url: `/sys/mqtt/log/delete/${id}`,
        method: 'delete'
    })
}